package dao.mysql;

import java.sql.*;

public class MyConnection {
	private static final String dbUrl = "jdbc:mysql://localhost:3306/LAPS";
	private static final String dbUser = "root";
	private static final String dbPassword = "password";
	Connection conn;
	
	public Connection getConnection()
	{
		try
		{
			Class.forName("com.mysql.jdbc.Driver");
		}catch(ClassNotFoundException cnfex)
		{
			cnfex.printStackTrace();
		}
		
		try
		{
			conn = DriverManager.getConnection(dbUrl, dbUser, dbPassword);
		}
		catch(SQLException sqlex)
		{
			sqlex.printStackTrace();
		}
	
		return conn;
		
	}


}
